package com.sxhuayuan.parking.service.impl;

import com.sxhuayuan.parking.entity.Agent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.sxhuayuan.parking.dao.AgentRelationDao;
import com.sxhuayuan.parking.dao.BaseDao;
import com.sxhuayuan.parking.entity.AgentRelation;
import com.sxhuayuan.parking.service.AgentRelationService;

import java.util.List;

@Service("agentRelationServiceImpl")
public class AgentRelationServiceImpl extends BaseServiceImpl<AgentRelation, Long> implements AgentRelationService {

	@Autowired
	AgentRelationDao dao;

	@Override
	public BaseDao<AgentRelation, Long> getDAO() {
		return dao;
	}

	@Override
	public void deleteRelation(Long id) {
		dao.deleteRelation(id);
	}

	@Override
	public List<Agent> findChildrenByParent(Agent agent) {
		return dao.findChildrenByParent(agent);
	}
}
